package ca.usherbrooke.domus.sipnmove.useragent.view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import ca.usherbrooke.domus.sipnmove.useragent.controller.ActionController;

/**
 * Quit button in user agent view
 */
@SuppressWarnings("serial")
public class QuitButton extends JButton implements ActionListener {

	/**
	 * Action controller
	 */
	private ActionController actionController;

	/**
	 * Default constructor
	 * @param actionController 
	 */
	public QuitButton(ActionController actionController) {
		super("Quit");
		
		this.actionController = actionController;
		this.addActionListener(this);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		this.actionController.doAction();
	}

}
